package edu.ynu.se.xiecheng.achitectureclass.dao;
import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;
import edu.ynu.se.xiecheng.achitectureclass.entity.SoilTemperatureData;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface SoilTemperatureDataDao extends LogicDAO<SoilTemperatureData,Long> {
    List<SoilTemperatureData> findAll();
    SoilTemperatureData findTopByOrderByCreateTimeDesc();

    // 获取土壤温度历史数据（分页）
    Page<SoilTemperatureData> findAllByOrderByCreateTimeDesc(Pageable pageable);
}
